home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
KADFILE.ZIP
/
ENCRYPT.H
< prev
next >
Wrap
Text File
|
1995-03-06
|
647b
|
24 lines
char encryptionkey[44] = {"sdfoi(*A()8 eritkkljhdsf7 ;LJdkfglk=+_)48*&"};
void encryptdir(char *directory,int numdirs,char *password)
{
int x,y,z;
if (strcmp(password,"") != 0) { /* encrypt directory */
x = 0;
y = 0;
z = 0;
while (x < (sizeof(dir_struc)*numdirs)) {
directory[x] = (directory[x] ^ (password[y] ^ encryptionkey[z]));
x++;
y++;
z++;
if (z > strlen(encryptionkey))
z = 0;
if (y > strlen(password))
y = 0;
}
}
}